<script setup lang="ts">
const props = withDefaults(defineProps<{
  picture?: string | undefined
  size?: number
}>(), {
  picture: '',
  size: 120,
})

const style = {
  width: `${props.size}rpx`,
  height: `${props.size}rpx`,
}
</script>

<template>
  <view :style="style">
    <image v-if="props.picture" class="border-solid border-2px border-white rounded-full overflow-hidden" :style="style" :src="props.picture" />
    <image v-else :style="style" src="@/static/images/profile/avatar-placeholder.png" />
  </view>
</template>
